//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package common;

public class AdvertisementEntry {
    private long avatarId;
    private int expLevel;
    private int productId;
    private int price;
    private int amount;
    private int unknown;
    private boolean isValid = false;

    public AdvertisementEntry() {
    }

    public void decode(ByteStream stream) {
        this.avatarId = stream.readLong().longValue();
        this.expLevel = stream.readInt();
        this.productId = stream.readInt();
        this.price = stream.readInt();
        this.amount = stream.readInt();
        this.unknown = stream.readInt();
        this.isValid = true;
    }

    public long avatarId() {
        return this.avatarId;
    }

    public int expLevel() {
        return this.expLevel;
    }

    public int productId() {
        return this.productId;
    }

    public int price() {
        return this.price;
    }

    public int amount() {
        return this.amount;
    }

    public int unknown() {
        return this.unknown;
    }

    public boolean valid() {
        return this.isValid;
    }

    public String toString() {
        return this.isValid?"AdvertisementEntry:[ avatarId:" + this.avatarId + ", expLevel:" + this.expLevel + ", productId:" + this.productId + ", price:" + this.price + ", amount:" + this.amount + ", " + this.unknown + " ]":"AdvertisementEntry: empty";
    }
}
